<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>NormalSystem</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="./css/font.css">
    <link rel="stylesheet" href="./css/xadmin.css">
    <script type="text/javascript" src="./lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="./js/jquery.js"></script>
    <script type="text/javascript" src="./js/xadmin.js"></script>
    <script type="text/javascript" src="./js/project.js"></script>
</head>

<body>
<div class="x-body">
    <form class="layui-form" lay-filter="dbForm">
        <input type="hidden" id="projectCode" name="projectCode" />
        <div class="layui-form-item">
            <label for="pName" class="layui-form-label">
                <span class="x-red">*</span>项目名称
            </label>
            <div class="layui-input-inline">
                <input type="text" id="pName" name="pName" required="" readonly
                       autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red">*</span>
            </div>
        </div>
        <div class="layui-form-item">
            <label for="dbName" class="layui-form-label">
                <span class="x-red">*</span>数据库名称
            </label>
            <div class="layui-input-inline">
                <input type="text" id="dbName" name="dbName" required="" lay-verify="required"
                       autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red">*</span>
            </div>
        </div>

        <div class="layui-form-item">
            <button  class="layui-btn" lay-filter="addDb" lay-submit="">
                保存
            </button>
        </div>
    </form>
</div>
<script>
    // var url = location.href;
    // var paraString = url.substring(url.indexOf("?") + 1, url.length);
    var str=location.href; //取得整个地址栏
    var num=str.indexOf("?")
    str=str.substr(num+1); //取得所有参数   stringvar.substr(start [, length ]
    var arr=str.split("&"); //各个参数放到数组里
    var pName = decodeURI(arr[1].substr(arr[1].indexOf("=")+1)),code = arr[0].substr(arr[0].indexOf("=")+1);
    $("#pName").val(pName);
    $("#projectCode").val(code);
</script>

</body>

</html>